package cn.kgc.kgczuulserver.configinfo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author geQiang
 * @version 1.0
 * @date 2019/4/14
 * @description cn.kgc.kgczuulserver.configinfo
 */
@RestController
@RefreshScope
public class InfoController {
    @Value("${eureka.port}")
    private String port;

    @Value("${tokenValidation}")
    private String tokenValidation;

    @GetMapping("/port")
    public String getPort() {
        return "配置文件中的端口为：" + this.port + ",token=" + tokenValidation;
    }
}
